package com.linkoog.devtools.metadata;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.intellij.psi.PsiMember;
import com.linkoog.devtools.metadata.Metadata;
import com.linkoog.devtools.type.javadoc.JavaDoc;
import lombok.Getter;
import lombok.Setter;

import java.util.function.Supplier;

public abstract class DocumentMetadata<K extends PsiMember> extends Metadata<K> {

    @Setter
    protected volatile JavaDoc javaDoc;
    @JsonIgnore @Setter
    protected Supplier<JavaDoc> javaDocSupplier;
    @Setter
    protected volatile String swaggerComment;
    @JsonIgnore @Setter
    protected Supplier<String> swaggerCommentSupplier;

    public DocumentMetadata(String filePath, int psiElementOffset, String name) {
        super(filePath, psiElementOffset, name);
    }

    public abstract JavaDoc getJavaDoc();

    public abstract String getSwaggerComment();
}
